1 # Building in Arch Linux
3 To build BetaFlight, first the ARM toolchain has to be installed:
5 ## Setup GNU ARM Toolchain
8 pacman -S arm-none-eabi-gcc arm-none-eabi-newlib arm-none-eabi-binutils
11 For running tests, the `libblocksruntime` package from the AUR also has to be installed:
13 trizen -S libblocksruntime
16 At the time of writing, the repository version of GCC is 9.2.0, unlike 9.2.1 which BetaFlight expects.
17 If you get the following error, you can override the GCC version in `make/locak.mk` before proceeding:
20 make/tools.mk:301: *** **ERROR** your arm-none-eabi-gcc is '9.2.0', but '9.2.1' is expected. Override with 'GCC_REQUIRED_VERSION' in make/local.mk or run 'make arm_sdk_install' to install the right version automatically in the tools folder of this repo. Stop.
21 $ echo "GCC_REQUIRED_VERSION = 9.2.0" >> make/local.mk
26 After the ARM toolchain is installed, you should be able to build from source.
29 git clone git@github.com:betaflight/betaflight.git
34 You'll see a set of files being compiled, and finally linked, yielding both an ELF and then a HEX:
39 -rwxr-xr-x 1 s-ol s-ol 428584 Jan 11 12:04 betaflight_4.2.0_MATEKF411.bin*
40 -rw-r--r-- 1 s-ol s-ol 1136991 Jan 11 12:04 betaflight_4.2.0_MATEKF411.hex
41 drwxr-xr-x 3 s-ol s-ol 4096 Jan 11 12:04 main/
44 You can use the Betaflight-Configurator to flash the `obj/betaflight_4.2.0_MATEKF411.hex` file.
46 ## Updating and rebuilding
48 Navigate to the local betaflight repository and use the following steps to pull the latest changes and rebuild your version of betaflight: